package com.four.hospital.controller;

import com.four.common.utils.R;
import com.four.hospital.entity.Area;
import com.four.hospital.service.AreaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**吧0
 * @Author:wsy
 * @Date: 2022/01/12/10:48
 * @Description
 */
@RestController
@RequestMapping("hospital/area")
public class AreaController {

    @Autowired
    private AreaService areaService;


    /**
     * 查所有地址
     * @return
     */
    @GetMapping("/threeArea")
    public R threeArea(){
        List<Area> areaList=areaService.threeArea();
        return R.ok().put("areaList",areaList);
    }

}